import Vue from 'vue'
import Vuex from 'vuex'
import state from './state'
import mutations from './mutations'
import actions from './actions'
import getters from './getters'

Vue.use(Vuex)

export default new Vuex.Store({
  // state 用于保存全局共享数据
  state: state,
  // // mutations 用于修改 state的数据
  mutations: mutations,
  // // actions 用于触发 mutations 的方法
  actions: actions,
  // 计算属性
  getters: getters
})
